From 5aaf75201324fb6f7677493930c1dcc126b499c2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Timm=20B=C3=A4der?= Date: Sat, 3 Feb 2018 23:14:16 +0100 Subject: [PATCH] roundedrect: Fix coordinate mixup in contains_point This together with the optimizations in GtkSnapshot was causing circular buttons to become squared when partially scrolled out of view. --- gsk/gskroundedrect.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gsk/gskroundedrect.c b/gsk/gskroundedrect.c index ce9757eff0..382d56a835 100644 --- a/gsk/gskroundedrect.c +++ b/gsk/gskroundedrect.c @@ -362,7 +362,7 @@ gsk_rounded_rect_contains_point (const GskRoundedRect *self, return FALSE; if (self->bounds.origin.x + self->corner[GSK_CORNER_BOTTOM_LEFT].width > point->x && - self->bounds.origin.y + self->bounds.size.height - self->corner[GSK_CORNER_BOTTOM_LEFT].height > point->y && + self->bounds.origin.y + self->bounds.size.height - self->corner[GSK_CORNER_BOTTOM_LEFT].height < point->y && !ellipsis_contains_point (&self->corner[GSK_CORNER_BOTTOM_LEFT], &GRAPHENE_POINT_INIT ( self->bounds.origin.x + self->corner[GSK_CORNER_BOTTOM_LEFT].width - point->x, @@ -371,7 +371,7 @@ gsk_rounded_rect_contains_point (const GskRoundedRect *self, return FALSE; if (self->bounds.origin.x + self->bounds.size.width - self->corner[GSK_CORNER_BOTTOM_RIGHT].width < point->x && - self->bounds.origin.y + self->bounds.size.height - self->corner[GSK_CORNER_BOTTOM_RIGHT].height > point->y && + self->bounds.origin.y + self->bounds.size.height - self->corner[GSK_CORNER_BOTTOM_RIGHT].height < point->y && !ellipsis_contains_point (&self->corner[GSK_CORNER_BOTTOM_RIGHT], &GRAPHENE_POINT_INIT ( self->bounds.origin.x + self->bounds.size.width - self->corner[GSK_CORNER_BOTTOM_RIGHT].width - point->x, -- 2.30.2